<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="AbstractController,camo.controllers.AbstractController,_observableComponent,active,addListeners,init,onEventRecieved,removeListeners" name="keywords">
<title>camo.controllers.AbstractController</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'AbstractController - My Application';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?camo/controllers/AbstractController.html&amp;camo/controllers/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;AbstractController</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class AbstractController"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">camo.controllers</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class AbstractController</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">AbstractController <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Subclasses</td><td><a href="../controllers/FormController.html">FormController</a>, <a href="../controllers/ToggleController.html">ToggleController</a></td>
</tr>
</table>
<p></p>
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#active">active</a> : Boolean<div class="summaryTableDescription">[write-only]
   <p>Toggles active state of the Controller.</div>
</td><td class="summaryTableOwnerCol">AbstractController</td>
</tr>
</table>
</div>
<a name="protectedPropertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Properties</div>
<table id="summaryTableProtectedProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#_observableComponent">_observableComponent</a> : <a href="../views/components/AbstractComponent.html">AbstractComponent</a>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">AbstractController</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#AbstractController()">AbstractController</a>(self:<a href="AbstractController.html">AbstractController</a>, target:<a href="../views/components/AbstractComponent.html">AbstractComponent</a>)</div>
<div class="summaryTableDescription">
   <p>The AbstractController contains core logic for any type of Controller
   in the framework.</div>
</td><td class="summaryTableOwnerCol">AbstractController</td>
</tr>
</table>
</div>
<a name="methodSummary"></a><a name="protectedMethodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Methods</div>
<table id="summaryTableProtectedMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addListeners()">addListeners</a>(target:EventDispatcher):void</div>
<div class="summaryTableDescription">
   <p>In this default setup the Controller will listen to any Component 
   Action Event passed up from the observed target (_observableComponent).</div>
</td><td class="summaryTableOwnerCol">AbstractController</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#init()">init</a>(target:<a href="../views/components/AbstractComponent.html">AbstractComponent</a>):void</div>
<div class="summaryTableDescription">
   <p>Init state for Controller.</div>
</td><td class="summaryTableOwnerCol">AbstractController</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#onEventRecieved()">onEventRecieved</a>(e:<a href="../events/ComponentEvent.html">ComponentEvent</a>):void</div>
<div class="summaryTableDescription">
   <p>Called when Controller is active and listening for a ComponentEvent.</div>
</td><td class="summaryTableOwnerCol">AbstractController</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeListeners()">removeListeners</a>(target:EventDispatcher):void</div>
<div class="summaryTableDescription">
   <p>This is the default remover of any listeners on the observable component.</p>
   
   </div>
</td><td class="summaryTableOwnerCol">AbstractController</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="active"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">active</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>active:Boolean</code>&nbsp;&nbsp;[write-only]<p>
   </p><p>Toggles active state of the Controller. Once active listeners
   are added to the observable component, when deactivated they are
   removed. This is automated to help keep listeners in check to
   help avoid memory leaks.</p>
   <span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set active(value:Boolean):void</code>
<br>
</div>
<a name="_observableComponent"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">_observableComponent</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected var _observableComponent:<a href="../views/components/AbstractComponent.html">AbstractComponent</a></code>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="AbstractController()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">AbstractController</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function AbstractController(self:<a href="AbstractController.html">AbstractController</a>, target:<a href="../views/components/AbstractComponent.html">AbstractComponent</a>)</code><p>
   </p><p>The AbstractController contains core logic for any type of Controller
   in the framework. Controllers apply I/O logic to any supplied
   Component. Use controllers to add state and visual management in places
   where you would like to have reusable and portable logic. Sliders, State
   Managers and input forms are all kinds of controllers that can be created
   from this AbstractClass.</p>
   <p>Its also important to note that this class cannot be directly constructed,
   it should be extended by a concrete class.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">self</span>:<a href="AbstractController.html">AbstractController</a></code> &mdash; Reference of an AcbstarctController, this is used to keep the
   AbstractController from directly being instanciated.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:<a href="../views/components/AbstractComponent.html">AbstractComponent</a></code> &mdash; This should be any class that extends the AbstractComponent.
   This is the main target, or observable, that the controler will manage.
   </td>
</tr>
</table>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="addListeners()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addListeners</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>protected function addListeners(target:EventDispatcher):void</code><p>
   </p><p>In this default setup the Controller will listen to any Component 
   Action Event passed up from the observed target (_observableComponent).
   When an Event is received it is passed to the onEventReceived function.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:EventDispatcher</code> &mdash; AbstractComponent passed in from the activate setter.
   </td>
</tr>
</table>
</div>
<a name="init()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">init</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function init(target:<a href="../views/components/AbstractComponent.html">AbstractComponent</a>):void</code><p>
   </p><p>Init state for Controller. Sets the observable component as well as
   makes the controller active.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:<a href="../views/components/AbstractComponent.html">AbstractComponent</a></code> &mdash; AbstractComponent reference that is supplied buy the constructor.
   </td>
</tr>
</table>
</div>
<a name="onEventRecieved()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">onEventRecieved</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function onEventRecieved(e:<a href="../events/ComponentEvent.html">ComponentEvent</a>):void</code><p>
   </p><p>Called when Controller is active and listening for a ComponentEvent.
   This is set up to immediately stop the propagation of the event to
   keep conflicts in parent classed from happening. Override this in
   any extended class to add in custom logic for the controller.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">e</span>:<a href="../events/ComponentEvent.html">ComponentEvent</a></code> &mdash; Event recieved from _observableComponent.
   </td>
</tr>
</table>
</div>
<a name="removeListeners()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeListeners</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected function removeListeners(target:EventDispatcher):void</code><p>
   </p><p>This is the default remover of any listeners on the observable component.</p>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:EventDispatcher</code> &mdash; AbstractComponent passed in from the activate setter.
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
